<!DOCTYPE html>
<html lang="en">
<head>
    <title>展会公司所有大区报表</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <link rel="stylesheet" href="/dist/plugins/select2/select2.min.css">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=86e2297f">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=222aea35">

</head>
<body>
<section class="content" id="list">

    <div class="box-body no-padding" style="overflow: auto;background: #fff;">
        <table class="table table-hover table-bordered text-center">
            <thead>
            <tr>
                <th style="width: 10%">大区</th>
                <th style="width: 10%">大区经理</th>
                <th style="width: 6%">客户目标</th>
                <th style="width: 8%">参会人<br>数标准</th>
                <th style="width: 6%">参会人数</th>
                <th style="width: 6%">定金目标</th>
                <th style="width: 8%">定金目<br>标标准</th>
                <th style="width: 5%">已交</th>
                <th style="width: 5%">肯定交</th>
                <th style="width: 5%">不确定</th>
                <th style="width: 5%">不交</th>
            </tr>
            </thead>
            <tbody>
            <tr v-for="(item,index) in list" v-if="item.PARENTID == 0">
                <td @click="toBigRegion(item.ID,item.NAME)" style="color: #169bd5;"  class='clickable'>{{item.NAME}}</td>
                <td>{{item.userName}}</td>

                <td>{{item.customNum==0?"-":item.customNum}}</td>

                <td>{{item.customNum==0?"-":Math.round(item.customNum*1.5)}}</td>

                <td>{{item.participationNum==0?"-":item.participationNum}}</td>

                <td>{{item.depositNum==0?"-":item.depositNum}}</td>

                <td>{{item.customNum==0?"-":Math.round(item.customNum*0.2)}}</td>

                <td>{{item.deposit1==0?"-":item.deposit1}}</td>

                <td>{{item.deposit2==0?"-":item.deposit2}}</td>

                <td>{{item.deposit3==0?"-":item.deposit3}}</td>

                <td>{{item.deposit4==0?"-":item.deposit4}}</td>
            </tr>
            <tr style="font-weight: bold">
                <td colspan="2">合计</td>
                <td>{{totalData.customNum}}</td>
                <td>{{Math.round(totalData.customNum*1.5)}}</td>
                <td>{{totalData.participationNum}}</td>
                <td>{{totalData.depositNum}}</td>
                <td>{{Math.round(totalData.customNum*0.2)}}</td>
                <td>{{totalData.deposit1}}</td>
                <td>{{totalData.deposit2}}</td>
                <td>{{totalData.deposit3}}</td>
                <td>{{totalData.deposit4}}</td>
            </tr>
            </tbody>
        </table>
    </div>
    <!-- /.box-body -->
</section>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript">

    var app = new Vue({
        el: '#list',
        data: {
            list:[
            ],
            totalData:{
                "customNum": 0,
                "participationNum": 0,
                "depositNum": 0,
                "deposit1": 0,
                "deposit2": 0,
                "deposit3": 0,
                "deposit4": 0
            },
            months:[],
            currentUser: getCurrentUser(),
            readerName: "",
            userId: getCurrentUser().id,
            exhibitionId:"",
            exhibitionCreateUserId:"",
            time: ""
        },
        methods: {

            toBigRegion: function (regionId,titleName) {
                var  that=this;
                url = "reportForm/exhibition/bigRegion.html?exhibitionId="+that.exhibitionId+"&regionId="+regionId+"&t=" + new Date()+"";
                top.addTabs({id: "exhibitionBigRegion", title: titleName, close: true, url: url});
            },
            refresh: function () {
                this.initList();
            },
            //  初始化菜单
            initList: function () {
                var that = this;
                $.wyui.postMethod(
                    urlConfig.crm.exhibition.getReportData,
                    {userId: that.exhibitionCreateUserId, exhibitionId: that.exhibitionId},
                    function (r) {
                        that.list = r;

                        console.log(r);
                        for (var i = 0; i < r.length; i++) {
                            var reportData = r[i];
                            if (reportData.PARENTID == 0) {
                                that.totalData.customNum = Number(that.totalData.customNum) + Number(reportData.customNum);
                                that.totalData.participationNum = Number(that.totalData.participationNum) + Number(reportData.participationNum);
                                that.totalData.depositNum = Number(that.totalData.depositNum) + Number(reportData.depositNum);
                                that.totalData.deposit1 = Number(that.totalData.deposit1) + Number(reportData.deposit1);
                                that.totalData.deposit2 = Number(that.totalData.deposit2) + Number(reportData.deposit2);
                                that.totalData.deposit3 = Number(that.totalData.deposit3) + Number(reportData.deposit3);
                                that.totalData.deposit4 = Number(that.totalData.deposit4) + Number(reportData.deposit4);
                            }
                        }
                    });
            }
        },

        mounted: function () {

            this.exhibitionId = $.wyui.page.urlParams.exhibitionId;
            this.exhibitionCreateUserId = $.wyui.page.urlParams.userId;
            this.initList();
        }
    });
</script>

</body>
</html>



